package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PurchaseMtMapper;
import com.ruoyi.system.domain.PurchaseMt;
import com.ruoyi.system.service.IPurchaseMtService;

/**
 * 采购管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-19
 */
@Service
public class PurchaseMtServiceImpl implements IPurchaseMtService 
{
    @Autowired
    private PurchaseMtMapper purchaseMtMapper;

    /**
     * 查询采购管理
     * 
     * @param supplierId 采购管理主键
     * @return 采购管理
     */
    @Override
    public PurchaseMt selectPurchaseMtBySupplierId(Integer supplierId)
    {
        return purchaseMtMapper.selectPurchaseMtBySupplierId(supplierId);
    }

    /**
     * 查询采购管理列表
     * 
     * @param purchaseMt 采购管理
     * @return 采购管理
     */
    @Override
    public List<PurchaseMt> selectPurchaseMtList(PurchaseMt purchaseMt)
    {
        return purchaseMtMapper.selectPurchaseMtList(purchaseMt);
    }

    /**
     * 新增采购管理
     * 
     * @param purchaseMt 采购管理
     * @return 结果
     */
    @Override
    public int insertPurchaseMt(PurchaseMt purchaseMt)
    {
        return purchaseMtMapper.insertPurchaseMt(purchaseMt);
    }

    /**
     * 修改采购管理
     * 
     * @param purchaseMt 采购管理
     * @return 结果
     */
    @Override
    public int updatePurchaseMt(PurchaseMt purchaseMt)
    {
        return purchaseMtMapper.updatePurchaseMt(purchaseMt);
    }

    /**
     * 批量删除采购管理
     * 
     * @param supplierIds 需要删除的采购管理主键
     * @return 结果
     */
    @Override
    public int deletePurchaseMtBySupplierIds(Integer[] supplierIds)
    {
        return purchaseMtMapper.deletePurchaseMtBySupplierIds(supplierIds);
    }

    /**
     * 删除采购管理信息
     * 
     * @param supplierId 采购管理主键
     * @return 结果
     */
    @Override
    public int deletePurchaseMtBySupplierId(Integer supplierId)
    {
        return purchaseMtMapper.deletePurchaseMtBySupplierId(supplierId);
    }
}
